package com.designmodel.proxymodel.staticproxy;

/**
 * Created by
 *     静态代理模式   只能代理一类对象 扩展维护性比较差
 * @author touni
 * @date 2019/4/1
 * @time 12:06
 */
public class CommitButtonProxy implements Button {

    private String role;


    public CommitButtonProxy(String role){
        this.role = role;

    }




    public void click() {
        if ("admin".equals(role)){
            System.out.println("这个按钮被点击了");


        }else {
            System.out.println("您无法点击这个按钮");

        }




    }
}
